﻿<style>
    .wicon {
        background-image: url("");
        background-repeat: no-repeat;
        background-position: right center;
    }

    .workinput {
        width: 100%;
        line-height: 21px;
        border: 1px #ddd solid;
        border-radius: 4px;
        padding: 5px;
        background-color: transparent;
        float: left;
        font-size: 14px;
    }
</style>
<form class="form-group" id="article-form" method="post" onsubmit="return false">
    <input type="hidden" ng-model="post.Author">
    <input type="hidden" ng-model="post.Email">
    <div class="input-group">
        <span class="input-group-addon size18">文章标题：</span>
        <div class="fg-line">
            <input type="text" class="form-control input-lg" ng-model="post.Title" required placeholder="请输入文章标题">
        </div>
        <span class="input-group-btn">
            <button type="button" class="btn btn-info btn-lg waves-effect" ng-click="showupload()" style="font-size: 15px;"><i class="icon-upload4 size18"></i>上传word文档</button>
        </span>
    </div>
    <!-- 加载编辑器的容器 -->
    <div class="form-group overlay animated bounceInDown">
        <div style="height: 56vh;" class="ueditor" ng-model="post.Content" type="text/plain"></div>
        <h3 class="size16">
            <small ng-hide="showProtectContent==1">
                <label class="el-switch">
                    <input type="checkbox" name="switch" ng-checked="post.ProtectContent.length>1">
                    <span class="el-switch-style" ng-click="showProtectContent=1"></span>
                </label>
            </small>
            文章加密内容：
            <small ng-if="post.ProtectContent.length>1||showProtectContent==1">
                授权可见
                <label class="el-switch">
                    <input type="checkbox" name="switch">
                    <span class="el-switch-style" ng-click="post.ProtectContentMode=1"></span>
                </label>
                评论可见
            </small>
        </h3>
        <div style="height: 200px;" class="ueditor" ng-model="post.ProtectContent" type="text/plain" ng-if="post.ProtectContent.length>1||showProtectContent==1"></div>
    </div>
    <div class="row">
        <div class="col-md-3 col-sm-6">
            <div class="input-group">
                <span class="input-group-addon">分类：</span>
                <div class="ui fluid search selection dropdown category">
                    <input name="category" type="hidden" id="category">
                    <i class="dropdown icon"></i>
                    <div class="default text">请选择分类</div>
                    <div class="menu">
                        <div class="item" ng-repeat="item in cat track by $index" data-value="{{item.Id}}">{{item.Name}}</div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-3 col-sm-6">
            <div class="input-group">
                <span class="input-group-addon">标签：</span>
                <div class="ui fluid multiple search selection dropdown tags">
                    <input name="Label" type="hidden" id="Label">
                    <i class="dropdown icon"></i>
                    <div class="default text">标签(选择或输入新标签)</div>
                    <div class="menu">
                        <div class="item" ng-repeat="item in Tags track by $index" data-value="{{item}}">{{item}}</div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-3 col-sm-6">
            <div class="input-group">
                <span class="input-group-addon">文章关键词：</span>
                <div class="ui fluid multiple search selection dropdown keyword">
                    <input name="keyword" type="hidden" id="keyword">
                    <div class="default text">文章关键词</div>
                    <div class="menu"></div>
                </div>
            </div>
        </div>
        <div class="col-md-3 col-sm-6">
            <div class="input-group">
                <span class="input-group-addon">专题：</span>
                <div class="ui fluid multiple search selection dropdown seminar">
                    <input name="seminar" type="hidden" id="seminar">
                    <i class="dropdown icon"></i>
                    <div class="default text">选择专题(可选)</div>
                    <div class="menu">
                        <div class="item" ng-repeat="item in Seminars track by $index" data-value="{{item.Id}}">{{item.Title}}</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-3">
            <div class="input-group">
                <span class="input-group-addon">作者：</span>
                <div class="fg-line">
                    <input type="text" class="form-control" ng-model="post.Author">
                </div>
            </div>
        </div>
        <div class="col-md-3">
            <div class="input-group">
                <span class="input-group-addon">邮箱：</span>
                <div class="fg-line">
                    <input type="text" class="form-control" ng-model="post.Email">
                </div>
            </div>
        </div>
        <div class="col-md-3">
            <div class="input-group">
                <span class="input-group-addon">
                    <label class="checkbox checkbox-inline m-r-20">
                        <input type="checkbox" id="DisableCopy" ng-model="post.DisableCopy">
                        <i class="input-helper"></i>
                        禁止转载
                    </label>
                    <label class="checkbox checkbox-inline m-r-20">
                        <input type="checkbox" id="DisableComment" ng-model="post.DisableComment">
                        <i class="input-helper"></i>
                        禁止评论
                    </label>
                    <label class="checkbox checkbox-inline m-r-20">
                        <input type="checkbox" ng-model="post.schedule" ng-click="Scheduled()">
                        <i class="input-helper"></i>
                        定时发表
                    </label>
                </span>
            </div>
        </div>
        <div class="col-md-3" ng-if="post.schedule">
            <div class="input-group">
                <span class="input-group-addon" ng-if="post.schedule"><label for="Label">定时：</label></span>
                <input type="text" class="workinput wicon" id="timespan" ng-model="post.timespan" readonly="readonly" ng-if="post.schedule" />
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-3">
            <div class="input-group">
                <span class="input-group-addon" id="sizing-addon2">按地区投放：</span>
                <select ng-model="post.LimitMode" ng-init="post.LimitMode = 0" class="form-control">
                    <option ng-value="0" selected="selected">不限</option>
                    <optgroup label="可见性">
                        <option ng-value="1">指定地区可见</option>
                        <option ng-value="3">指定地区可见但排除在内的这些地区</option>
                    </optgroup>
                    <optgroup label="不可见性">
                        <option ng-value="2">指定地区不可见</option>
                        <option ng-value="4">指定地区不可见但排除在内的这些地区</option>
                    </optgroup>
                </select>
                <span class="input-group-btn" ng-if="(post.LimitMode||0)==0">
                    <button type="button" class="btn btn-info" ng-click="submit(post)">发布</button>
                </span>
            </div>
        </div>
        <div class="col-md-5" ng-if="post.LimitMode>0">
            <div class="input-group">
                <span class="input-group-addon" ng-if="post.LimitMode%2==1">可见地区：</span>
                <span class="input-group-addon" ng-if="post.LimitMode%2==0"><strong class="text-red">不可见地区：</strong></span>
                <div class="fg-line">
                    <input type="text" class="form-control" placeholder="竖线分隔，如：江苏|苏州|移动|AS2333|DMIT，支持地区、运营商、ASN、机房名称" ng-model="post.Regions">
                </div>
                <span class="input-group-btn" ng-if="post.LimitMode<3">
                    <button type="button" class="btn btn-info waves-effect" ng-click="submit(post)">发布</button>
                </span>
            </div>
        </div>
        <div class="col-md-4" ng-if="post.LimitMode==3||post.LimitMode==4">
            <div class="input-group">
                <span class="input-group-addon">排除地区：</span>
                <div class="fg-line">
                    <input type="text" class="form-control" placeholder="竖线分隔，如：江苏|苏州|移动|AS2333|DMIT，支持地区、运营商、ASN、机房名称" ng-model="post.ExceptRegions">
                </div>
                <span class="input-group-btn">
                    <button type="button" class="btn btn-info waves-effect" ng-click="submit(post)">发布</button>
                </span>
            </div>
        </div>
    </div>
</form>
<div style="position: absolute; left: -20000px; ">
    <div id="docfile">
        <form id="docform" onsubmit="return false" enctype="multipart/form-data">
            <h4 class="h4">注意：重复上传将会覆盖之前上传的内容！</h4>
            <div class="file-box">
                <div class="input-group">
                    <input type="text" name="copyFile" disabled class="form-control"/>
                    <span class="input-group-btn">
                        <a href="javascript:void(0);" class="btn btn-info">浏览</a>
                    </span>
                    <input type="file" class="uploadFile" name="upload" onchange="getFile(this, 'copyFile')"/>
                </div>
            </div>
        </form>
        <button type="button" class="btn btn-primary waves-effect" ng-click="upload()"> 上传 </button>
    </div>
</div>